home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 March / Pc Users extra 6.iso / pshare95 / prog / formula1 / vcform1.z / DelItem.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-10-20  |  2.0 KB  |  71 lines

  1. VERSION 5.00
  2. Begin VB.Form Form2 
  3.    Caption         =   "Delete Item"
  4.    ClientHeight    =   3195
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   2370
  8.    LinkTopic       =   "Form2"
  9.    ScaleHeight     =   3195
  10.    ScaleWidth      =   2370
  11.    StartUpPosition =   1  'CenterOwner
  12.    Begin VB.CommandButton btnCancel 
  13.       Caption         =   "Cancel"
  14.       Default         =   -1  'True
  15.       Height          =   465
  16.       Left            =   1410
  17.       TabIndex        =   2
  18.       Top             =   2610
  19.       Width           =   810
  20.    End
  21.    Begin VB.CommandButton btnOK 
  22.       Caption         =   "OK"
  23.       Height          =   465
  24.       Left            =   225
  25.       TabIndex        =   1
  26.       Top             =   2595
  27.       Width           =   810
  28.    End
  29.    Begin VB.ListBox List1 
  30.       Height          =   2010
  31.       ItemData        =   "DelItem.frx":0000
  32.       Left            =   195
  33.       List            =   "DelItem.frx":0002
  34.       TabIndex        =   0
  35.       Top             =   45
  36.       Width           =   2025
  37.    End
  38.    Begin VB.Label Label1 
  39.       Caption         =   "Select an Item to Delete."
  40.       Height          =   360
  41.       Left            =   240
  42.       TabIndex        =   3
  43.       Top             =   2160
  44.       Width           =   1980
  45.    End
  46. Attribute VB_Name = "Form2"
  47. Attribute VB_GlobalNameSpace = False
  48. Attribute VB_Creatable = False
  49. Attribute VB_PredeclaredId = True
  50. Attribute VB_Exposed = False
  51. Private Sub btnCancel_Click()
  52.     Form1.F1Book1.Tag = "Cancel"
  53.     Unload Form2
  54.     Form1.Show
  55. End Sub
  56. Private Sub btnOK_Click()
  57.     If List1.ListIndex = -1 Then
  58.         MsgBox "Make a selection."
  59.         Exit Sub
  60.     End If
  61.     Form1.F1Book1.Tag = List1.ListIndex
  62.     Unload Form2
  63.     Form1.Show
  64. End Sub
  65. Private Sub Form_Load()
  66.     Dim x As Integer
  67.     For x = 0 To Form1.F1Book1.ObjGetItemCount(Form1.F1Book1.ObjSelection(0)) - 1
  68.         List1.AddItem Form1.F1Book1.ObjItem(Form1.F1Book1.ObjSelection(0), x)
  69.     Next x
  70. End Sub
  71.